<?php
// +----------------------------------------------------------------------
// | Bwsaas
// +----------------------------------------------------------------------
// | Copyright (c) 2015~2020 http://www.buwangyun.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Gitee ( https://gitee.com/buwangyun/bwsaas )
// +----------------------------------------------------------------------
// | Author: buwangyun <hnlg666@163.com>
// +----------------------------------------------------------------------
// | Date: 2020-9-28 10:55:00
// +----------------------------------------------------------------------

namespace app\common\model;

use buwang\base\BaseModel;

class MemberMiniappOrder extends BaseModel
{

    protected $pk = 'id';

    /**
     * 用户小程序列表
     */
    public function lists(array $param)
    {
        return self::view('member_miniapp_order', 'id as order_id,start_time,end_time,is_lock as is_order_lock')
            ->view('miniapp', '*', 'member_miniapp_order.miniapp_id = miniapp.id')
            ->where($param)
            ->order('id desc')
            ->paginate(20, true);
    }
}